package cmd

import (
	"context"
	"detection-web/internal/controller"

	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/net/ghttp"
	"github.com/gogf/gf/v2/os/gcmd"
)

var (
	Main = gcmd.Command{
		Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
			s := g.Server()
			s.Group("/api", func(group *ghttp.RouterGroup) {
				group.POST("/check-product-status-console", controller.PromoteOrder.CheckProductStatusConsole) // 商品状态检查
				group.POST("/raw-wechat-api", controller.PromoteOrder.GetRawWechatAPIResponseHttp)             // 获取API原始响应
			})
			s.Run()
			return nil
		},
	}
)
